<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <!-- <link rel="stylesheet" type="text/css" href="http://unpkg.com/view-design/dist/styles/iview.css"> -->
    <script type="text/javascript" src="./vue.js"></script>
    <title>数字输入框组件</title>
</head>
<body>
<div id="app">
    <input-number v-model="value" :max="10" :min="0"></input-number>

    <button @click="changeValue">父组件修改Value</button>

</div>
<script type="text/x-template" id="inputNumberTemplate">
    <div class="input-number">
        <input type="text" @keyup.down="handleDown" @keyup.up="handleUp" :value="currentValue" @change="handleChange"/>
        <button @click="handleDown" :disabled="currentValue <= min">-</button>
        <button @click="handleUp" :disabled="currentValue >= max">+</button>
    </div>
</script>
<script src="./input-number.js"></script>
<script src="./index.js"></script>
</body>
</html>